#add_subdirectory(logger)
#add_subdirectory(utils)
#aux_source_directory(.logger LOGGER_SRC)
#aux_source_directory(.utils UTILS_SRC)
#add_definitions("-g -std=c++11")#to_string


#add_executable(utils ${LOGGER_SRC} ${UTILS_SRC})
#add_executable(utils ${LOGGER_SRC} ${UTILS_SRC})

#只需要部分源文件进行编译时
add_definitions("-g -std=c++11")#to_string

#add_executable(server ./utils/tcpServer.cc ./utils/IpAddressPort.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
#add_executable(client ./utils/tcpClient.cc ./utils/IpAddressPort.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
#add_executable(thread ./thread/thread.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
#add_executable(threadPool ./thread/thread.cc ./reactor/reactor.cc ./threadPool/threadPool.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
#add_executable(reactor ./reactor/reactor.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
#add_executable(controller ./view/view.cc ./controller /controller .cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
#add_executable(view ./view/view.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
#add_executable(server ./utils/IpAddressPort.cc ./utils/tcpServer.cc ./mainServer/mainServer.cc ./threadPool/threadPool.cc ./thread/thread.cc ./reactor/reactor.cc ./view/view.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
#target_link_libraries(server pthread event)
#add_executable(sql ./mysqldb/mysqldb.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
add_executable(redis ./redis/redis.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )
target_link_libraries(redis hiredis)
#target_link_libraries(sql mysqlclient)
#target_link_libraries(reactor event)
#target_link_libraries(threadPool pthread)
#target_link_libraries(thread pthread event)